home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / SpruceDriver / SpruceDriver.jar / org / spruce / midp / driver / Driver.class (.txt) < prev   
Encoding:
Java Class File  |  2002-04-05  |  4.6 KB  |  309 lines

  1. package org.spruce.midp.driver;
  2.  
  3. import javax.microedition.lcdui.Alert;
  4. import javax.microedition.lcdui.AlertType;
  5. import javax.microedition.lcdui.Command;
  6. import javax.microedition.lcdui.CommandListener;
  7. import javax.microedition.lcdui.Display;
  8. import javax.microedition.lcdui.Displayable;
  9. import javax.microedition.lcdui.Form;
  10. import javax.microedition.lcdui.Image;
  11. import javax.microedition.lcdui.List;
  12. import javax.microedition.midlet.MIDlet;
  13.  
  14. public final class Driver extends MIDlet implements CommandListener {
  15.    // $FF: renamed from: a java.lang.String[]
  16.    private static final String[] field_0 = new String[]{method_0("\u0002Se*"), method_0("\u001aZh#"), method_0("\u0013]k&:")};
  17.    // $FF: renamed from: b java.lang.String[]
  18.    private static final String[] field_1 = new String[]{method_0("\u0001Ka6<rKl6n1^vs9;Kls\"7Yps/<[$!'5Wps/ Mk$=|5"), method_0("\u0013\\g6\"7Me'+rHm'&rJts/ Mk$ur]v2%7\u001fs:::\u001f`<9<\u001fe!<=H*Y"), method_0("\u0013Ik:*rWk?+!\u001fe=*rPp;+ \u001fg2<!\u0011$\u0012\"!P$'<+\u001fp<n3Ik:*rHe'+ \u001ft<!>L$~n&Wa*n3Mas=>Vt#+ F*Y"), method_0("\u0015Zps/!\u001fi2 +\u001fb&+>\u001fw&>\"Sa>+<Kws/!\u001ft<=!Vf?+r\u0012$*!'M$5;7S$:=rMq= ;Qcs!'K$5/!K*s\u001a:Z$5;7S$?+$Zhs'!\u001fw;!%Q$< rKl6n>Zb'`X"), method_0("\u0016Pjt:r[v:87\u001fk=n&Was) ^w n=M$*!'\u0018h?n0Z$?!!Vj4n+Pq!n\"Pm=:!\u0011\u000e")};
  19.    // $FF: renamed from: c java.lang.String
  20.    private static final String field_2 = "\u0001Ov&-7\u001f@!'$ZvY\u00187M*s\u007f|\u000e\u000e├║n`\u000f4an0F$$9%\u0011w#<'\\a}! X";
  21.    // $FF: renamed from: d org.spruce.midp.driver.c
  22.    private c field_3;
  23.    // $FF: renamed from: e javax.microedition.lcdui.Command
  24.    private Command field_4;
  25.    // $FF: renamed from: f javax.microedition.lcdui.Command
  26.    private Command field_5;
  27.    // $FF: renamed from: g javax.microedition.lcdui.Command
  28.    private Command field_6;
  29.    // $FF: renamed from: h javax.microedition.lcdui.Command
  30.    private Command field_7;
  31.    // $FF: renamed from: i javax.microedition.lcdui.Command
  32.    private Command field_8;
  33.    // $FF: renamed from: j javax.microedition.lcdui.Command
  34.    private Command field_9;
  35.    // $FF: renamed from: k javax.microedition.lcdui.Command
  36.    private Command field_10;
  37.    // $FF: renamed from: l javax.microedition.lcdui.Command
  38.    private Command field_11;
  39.    // $FF: renamed from: m javax.microedition.lcdui.Form
  40.    private Form field_12;
  41.    // $FF: renamed from: n javax.microedition.lcdui.Display
  42.    private Display field_13;
  43.    // $FF: renamed from: o javax.microedition.lcdui.List
  44.    private List field_14;
  45.    // $FF: renamed from: p boolean
  46.    public static boolean field_15;
  47.  
  48.    public Driver() {
  49.       boolean var2 = field_15;
  50.       super();
  51.       this.field_4 = new Command(method_0("\u0017Gm'"), 7, 1);
  52.       this.field_5 = new Command(method_0("\u001aZh#"), 4, 1);
  53.       this.field_6 = new Command(method_0("\u0016Pj6"), 6, 1);
  54.       this.field_7 = new Command(method_0("\u0002Se*"), 4, 1);
  55.       this.field_8 = new Command(method_0("\u0002^q +"), 3, 1);
  56.       this.field_9 = new Command(method_0("\u0011Pj''<Ja"), 3, 1);
  57.       this.field_10 = new Command(method_0("\u0003Jm'"), 6, 1);
  58.       this.field_11 = new Command(method_0("\u0001Zh6-&"), 4, 1);
  59.       this.field_12 = new Form(method_0("\u0015^i6n Jh6="));
  60.       this.field_14 = new List(method_0("\u001fzJ\u0006"), 3, field_0, (Image[])null);
  61.       int var1 = 0;
  62.       if (var2) {
  63.          this.field_12.append(field_1[var1]);
  64.          ++var1;
  65.       }
  66.  
  67.       while(true) {
  68.          while(var1 < field_1.length) {
  69.             this.field_12.append(field_1[var1]);
  70.             ++var1;
  71.          }
  72.  
  73.          this.field_12.addCommand(this.field_6);
  74.          this.field_12.setCommandListener(this);
  75.          this.field_14.addCommand(this.field_4);
  76.          this.field_14.addCommand(this.field_11);
  77.          this.field_14.setCommandListener(this);
  78.          if (!var2) {
  79.             if (org.spruce.midp.common.c.i) {
  80.                field_15 = !var2;
  81.             }
  82.  
  83.             return;
  84.          }
  85.  
  86.          ++var1;
  87.       }
  88.    }
  89.  
  90.    public void startApp() {
  91.       boolean var1 = field_15;
  92.       Display var10000 = this.field_13;
  93.       if (!var1) {
  94.          if (var10000 == null) {
  95.             this.field_13 = Display.getDisplay(this);
  96.             new org.spruce.midp.common.c(this.field_13, this.field_14);
  97.             if (!var1) {
  98.                return;
  99.             }
  100.          }
  101.  
  102.          var10000 = this.field_13;
  103.       }
  104.  
  105.       var10000.setCurrent(this.field_14);
  106.    }
  107.  
  108.    public void commandAction(Command var1, Displayable var2) {
  109.       boolean var4;
  110.       Command var10000;
  111.       Command var10001;
  112.       label87: {
  113.          label88: {
  114.             label89: {
  115.                var4 = field_15;
  116.                var10000 = var1;
  117.                var10001 = this.field_4;
  118.                if (!var4) {
  119.                   if (var1 == var10001) {
  120.                      this.destroyApp(false);
  121.                      ((MIDlet)this).notifyDestroyed();
  122.                      if (!var4) {
  123.                         return;
  124.                      }
  125.                   }
  126.  
  127.                   var10000 = var1;
  128.                   var10001 = this.field_6;
  129.                   if (var4) {
  130.                      break label89;
  131.                   }
  132.                }
  133.  
  134.                if (var10000 == var10001) {
  135.                   this.field_13.setCurrent(this.field_14);
  136.                   if (!var4) {
  137.                      return;
  138.                   }
  139.                }
  140.  
  141.                var10000 = var1;
  142.                var10001 = this.field_8;
  143.                if (var4) {
  144.                   break label88;
  145.                }
  146.             }
  147.  
  148.             if (var10000 == var10001) {
  149.                this.field_3.a(true);
  150.                this.field_3.removeCommand(this.field_8);
  151.                this.field_3.addCommand(this.field_9);
  152.                if (!var4) {
  153.                   return;
  154.                }
  155.             }
  156.  
  157.             var10000 = var1;
  158.             var10001 = this.field_9;
  159.             if (var4) {
  160.                break label87;
  161.             }
  162.          }
  163.  
  164.          if (var10000 == var10001) {
  165.             this.field_3.a(false);
  166.             this.field_3.removeCommand(this.field_9);
  167.             this.field_3.addCommand(this.field_8);
  168.             if (!var4) {
  169.                return;
  170.             }
  171.          }
  172.  
  173.          var10000 = var1;
  174.          var10001 = this.field_10;
  175.       }
  176.  
  177.       label59: {
  178.          label90: {
  179.             if (!var4) {
  180.                if (var10000 == var10001) {
  181.                   this.field_3.c();
  182.                   this.field_13.setCurrent(this.field_14);
  183.                   if (!var4) {
  184.                      return;
  185.                   }
  186.                }
  187.  
  188.                var10000 = var1;
  189.                var10001 = this.field_11;
  190.                if (var4) {
  191.                   break label90;
  192.                }
  193.             }
  194.  
  195.             if (var10000 == var10001) {
  196.                break label59;
  197.             }
  198.  
  199.             var10000 = var1;
  200.             var10001 = List.SELECT_COMMAND;
  201.          }
  202.  
  203.          if (var10000 != var10001) {
  204.             return;
  205.          }
  206.       }
  207.  
  208.       label45: {
  209.          label44: {
  210.             Driver var5 = this;
  211.             if (!var4) {
  212.                switch (this.field_14.getSelectedIndex()) {
  213.                   case 0:
  214.                      this.field_3 = new c(Display.getDisplay(this));
  215.                      this.field_3.addCommand(this.field_10);
  216.                      this.field_3.addCommand(this.field_8);
  217.                      this.field_3.setCommandListener(this);
  218.                      this.field_13.setCurrent(this.field_3);
  219.                      var5 = this;
  220.                      break;
  221.                   case 1:
  222.                      break label44;
  223.                   case 2:
  224.                      break label45;
  225.                   default:
  226.                      return;
  227.                }
  228.             }
  229.  
  230.             var5.field_3.b();
  231.             if (!var4) {
  232.                return;
  233.             }
  234.          }
  235.  
  236.          this.field_13.setCurrent(this.field_12);
  237.          if (!var4) {
  238.             return;
  239.          }
  240.       }
  241.  
  242.       Alert var3 = new Alert(method_0("\u0013]k&:"), method_0("\u0001Ov&-7\u001f@!'$ZvY\u00187M*s\u007f|\u000e\u000e├║n`\u000f4an0F$$9%\u0011w#<'\\a}! X"), (Image)null, AlertType.INFO);
  243.       var3.setTimeout(-2);
  244.       this.field_13.setCurrent(var3);
  245.    }
  246.  
  247.    public void pauseApp() {
  248.       this.field_13.setCurrent((Displayable)null);
  249.    }
  250.  
  251.    public void destroyApp(boolean var1) {
  252.    }
  253.  
  254.    // $FF: renamed from: a (java.lang.String) java.lang.String
  255.    private static String method_0(String var0) {
  256.       char[] var1 = var0.toCharArray();
  257.       int var2 = var1.length;
  258.       int var3 = 0;
  259.       char[] var10000;
  260.       int var10001;
  261.       if (var2 <= 1) {
  262.          var10000 = var1;
  263.          var10001 = var3;
  264.       } else {
  265.          if (var3 >= var2) {
  266.             return new String(var1);
  267.          }
  268.  
  269.          var10000 = var1;
  270.          var10001 = var3;
  271.       }
  272.  
  273.       while(true) {
  274.          char var10002 = var10000[var10001];
  275.          byte var10003;
  276.          switch (var3 % 5) {
  277.             case 0:
  278.                var10003 = 82;
  279.                break;
  280.             case 1:
  281.                var10003 = 63;
  282.                break;
  283.             case 2:
  284.                var10003 = 4;
  285.                break;
  286.             case 3:
  287.                var10003 = 83;
  288.                break;
  289.             default:
  290.                var10003 = 78;
  291.          }
  292.  
  293.          var10000[var10001] = (char)(var10002 ^ var10003);
  294.          ++var3;
  295.          if (var2 == 0) {
  296.             var10000 = var1;
  297.             var10001 = var2;
  298.          } else {
  299.             if (var3 >= var2) {
  300.                return new String(var1);
  301.             }
  302.  
  303.             var10000 = var1;
  304.             var10001 = var3;
  305.          }
  306.       }
  307.    }
  308. }
  309.